package com.ruoyi.base.domain;

import java.util.Date;

import javax.validation.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 房间对象 base_room
 * 
 * @author yepanpan
 * @date 2020-11-09
 */
@ApiModel("房间实体")
@Getter
@Setter
public class BaseRoom extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增长主键ID */
    private Long id;

    /** 楼宇 */
    @ApiModelProperty("楼宇ID")
    private Long buildId;

    
    @Excel(name="楼宇", prompt = "必填项")
    @ApiModelProperty("楼宇")
    private String buildName;

    /** 名称 */
    @Excel(name = "房间名称", prompt = "必填项")
    @ApiModelProperty("房间名称")
    @NotBlank(message="房间名称不能为空")
    private String title;
    
    /** 代码 */
    @Excel(name = "代码", prompt = "必填项")
    @ApiModelProperty("代码")
    @NotBlank(message="房间代码不能为空")
    private String code;

    /** 类型 1=教学	2=办公	3=住宿	4=仓储	9=其它*/
    @Excel(name = "用途", dictType = "room_use", combo = {"教学","办公","住宿","仓储", "其它"})
    @ApiModelProperty("用途")
    @NotBlank(message="房间用途不能为空")
    private String type;
    

    /** 座位/床位数 */
    @ApiModelProperty("座位/床位数")
    @Excel(name="座位/床位数", prompt = "必填项")
    @NotBlank(message="座位/床位数不能为空")
    private Long volume;

    /** 启用日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "启用日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("启用日期")
    @NotBlank(message="房间启用日期不能为空")
    private Date startDate;

    /** 停用日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "停用日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("停用日期")
    private Date endDate;

    /** 状态 */
    @Excel(name = "状态", dictType = "common_status", combo = {"启用","禁用"})
    @ApiModelProperty("状态")
    @NotBlank(message="房间状态不能为空")
    private String status;

  
	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("buildId", getBuildId())
            .append("buildName", getBuildName())
            .append("code", getCode())
            .append("title", getTitle())
            .append("type", getType())
            .append("volume", getVolume())
            .append("startDate", getStartDate())
            .append("endDate", getEndDate())
            .append("status", getStatus())
            .toString();
    }

	public String getBuildName() {
		return buildName;
	}

	public void setBuildName(String buildName) {
		this.buildName = buildName;
	}
    
}
